﻿//JumbotCms_4.1 Final
using System;
using System.Data;
using System.IO;
using System.Web;
using System.Web.UI.WebControls;
using JumbotCms.Common;
namespace JumbotCms.Modules.Version.AdminSource
{
    public partial class _pigeonhole : JumbotCms.API.AdminCenter
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //通过ccid传频道ID
            ChannelId = Str2Str(q("ccid"));
            id = Str2Str(q("id"));
            Admin_Load(ChannelId + "-04", "html", true);
            if (!Page.IsPostBack)
            {
                if (ddlChannel.Items.Count < 1)
                {
                    doh.Reset();
                    doh.SqlCmd = "SELECT ID,Title FROM [jcms_normal_channel] WHERE [Type]='version' AND [Enabled]=1 ORDER BY pId";
                    DataTable dtChannel = doh.GetDataTable();
                    this.ddlChannel.Items.Clear();
                    ListItem li;
                    for (int i = 0; i < dtChannel.Rows.Count; i++)
                    {
                        li = new ListItem();
                        li.Value = dtChannel.Rows[i]["Id"].ToString();
                        li.Text = dtChannel.Rows[i]["Title"].ToString();
                        this.ddlChannel.Items.Add(li);
                    }
                    dtChannel.Clear();
                    dtChannel.Dispose();
                }
            }
        }
    }
}
